call plug#begin('~/.config/nvim/plugged')
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
Plug 'junegunn/fzf', { 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'francoiscabrol/ranger.vim'
Plug 'rbgrouleff/bclose.vim'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'nashamri/spacemacs-theme'
Plug 'preservim/nerdtree', {'on': 'NERDTreeToggle'}
"Plug 'ludovicchabant/vim-gutentags'
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
"Plug 'mfulz/cscope.nvim'
Plug 'ronakg/quickr-cscope.vim'
Plug 'tczengming/autoload_cscope.vim'
Plug 'hari-rangarajan/cctree'
Plug 'charz/multi-cscope-db'
Plug 'mhinz/vim-startify'
call plug#end()

"========================================================
"ranger
let g:ranger_command_override = 'ranger --cmd "set show_hidden=true"'

"coc.nvim 
"设置tab 补全
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>"
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
"
"ranger 
let g:Lf_PreviewInPopup = 1


"+++++++++++++++++++++++++++++++++++++++
"			gtags.vim
"+++++++++++++++++++++++++++++++++++++++

"vim-gutentags 

" gutentags 搜索工程目录的标志，碰到这些文件/目录名就停止向上一级目录递归
"let g:gutentags_project_root = ['.project']

" 所生成的数据文件的名称
"let g:gutentags_ctags_tagfile = '.tags'

" 将自动生成的 tags 文件全部放入 ~/.cache/tags 目录中，避免污染工程目录
"let s:vim_tags = expand('~/.cache/tags')
"let g:gutentags_cache_dir = s:vim_tags

" 配置 ctags 的参数
"let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extra=+q']
"let g:gutentags_ctags_extra_args += ['--c++-kinds=+px']
"let g:gutentags_ctags_extra_args += ['--c-kinds=+px']

" 检测 ~/.cache/tags 不存在就新建
"if !isdirectory(s:vim_tags)
"   silent! call mkdir(s:vim_tags, 'p')
"endif
"quickr-cscope 
let g:quickr_cscope_use_qf_g = 1
let g:quickr_cscope_program = "gtags-cscope"
let g:quickr_cscope_db_file = "GTAGS"
let g:quickr_cscope_autoload_db = 0
